﻿@model IEnumerable<Traviesuras.Models.clsEvento>
@{
    Layout = null;
}
<style type="text/css">
.botonclase {
	-moz-box-shadow:inset 0px 1px 0px 0px #ffffff;
	-webkit-box-shadow:inset 0px 1px 0px 0px #ffffff;
	box-shadow:inset 0px 1px 0px 0px #ffffff;
	background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ededed), color-stop(1, #dfdfdf) );
	background:-moz-linear-gradient( center top, #ededed 5%, #dfdfdf 100% );
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed', endColorstr='#dfdfdf');
	background-color:#ededed;
	-webkit-border-top-left-radius:6px;
	-moz-border-radius-topleft:6px;
	border-top-left-radius:6px;
	-webkit-border-top-right-radius:6px;
	-moz-border-radius-topright:6px;
	border-top-right-radius:6px;
	-webkit-border-bottom-right-radius:6px;
	-moz-border-radius-bottomright:6px;
	border-bottom-right-radius:6px;
	-webkit-border-bottom-left-radius:6px;
	-moz-border-radius-bottomleft:6px;
	border-bottom-left-radius:6px;
	text-indent:0;
	border:1px solid #dcdcdc;
	display:inline-block;
	color:#777777;
	font-family:arial;
	font-size:15px;
	font-weight:bold;
	font-style:normal;
	height:30px;
	line-height:50px;
	width:400px;
	text-decoration:none;
	text-align:center;
	text-shadow:1px 1px 0px #ffffff;
}
.botonpublicar {
	-moz-box-shadow:inset 0px 1px 0px 0px #ffffff;
	-webkit-box-shadow:inset 0px 1px 0px 0px #ffffff;
	box-shadow:inset 0px 1px 0px 0px #ffffff;
	background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ededed), color-stop(1, #dfdfdf) );
	background:-moz-linear-gradient( center top, #ededed 5%, #B5B5B5 100% );
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed', endColorstr='#dfdfdf');
	background-color:#ededed;
	-webkit-border-top-left-radius:6px;
	-moz-border-radius-topleft:6px;
	border-top-left-radius:6px;
	-webkit-border-top-right-radius:6px;
	-moz-border-radius-topright:6px;
	border-top-right-radius:6px;
	-webkit-border-bottom-right-radius:6px;
	-moz-border-radius-bottomright:6px;
	border-bottom-right-radius:6px;
	-webkit-border-bottom-left-radius:6px;
	-moz-border-radius-bottomleft:6px;
	border-bottom-left-radius:6px;
	text-indent:0;
	border:1px solid #dcdcdc;
	display:inline-block;
	color:#777777;
	font-family:arial;
	font-size:15px;
	font-weight:bold;
	font-style:normal;
	height:30px;
	line-height:50px;
	width:80px;
	text-decoration:none;
	text-align:center;
	text-shadow:1px 1px 0px #ffffff;
}
.classname:hover {
	background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #dfdfdf), color-stop(1, #ededed) );
	background:-moz-linear-gradient( center top, #dfdfdf 5%, #ededed 100% );
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#dfdfdf', endColorstr='#ededed');
	background-color:#dfdfdf;
}.classname:active {
	position:relative;
	top:1px;
}</style>
<table align="center" width="800">
    <tr>
        <td>
            @using (Html.BeginForm())
            {
            <div id="comentario" style="background-color: #F1F1F1;">
                <table border="0">
                    <tr>
                        <td colspan="4">@Html.TextArea("Comentario", "", new { @maxlength = "300", @rows = "2", @cols = "99", @placeholder = "Ingresa tu Comentario Aqui." })</td>
                    </tr>
                    <tr>
                        <td width="100"></td>
                        <td width="90"></td>
                        <td width="500" style="text-align:right;">@Html.ValidationMessage("error", new { @style = "color:Red;" })</td>
                        <td width="60"><input id="publicar" value="Publicar" type="submit" class="botonpublicar" /></td>
                    </tr>
                </table>
            </div>
                <script>
                    //location.reload(true);
                </script>
            }
        </td>
    </tr>
    </table>
@using (Html.BeginForm("mas_eventos","Home",FormMethod.Post))
{
<table align="center" width="800">
    
    @foreach (var item in Model)
    {
        <tr>
        <td>
            <div id="@item.id_evento" style="background-color: #F1F1F1;">
                <div style="color:blue;">
                    <pre><b style="font-size: large;">@item.nombre_usuario</b><b style="text-align:right;"></b>@*<img style="background-position: -96px -128px; background-image: url(/Content/themes/base/images/ui-icons_222222_256x240.png); " />*@
<label style="color: #A6A6A6; font-size:smaller">@Convert.ToDateTime(item.fecha_creacion).ToShortDateString()</label>
@if (item.tipo_evento != "POST") { 
<label style="color: #A6A6A6; font-size:smaller">Evento para el dia: @Convert.ToDateTime(item.fecha_desde).ToLongDateString()</label>
}
<label style="color:black;">@item.descripcion</label></pre>
                </div>
            </div>
        </td>
    </tr>
        
    }
</table>

    <input id="final" name="final" value="@Model.Last().id_evento" type="text" style="visibility:hidden"/>
    <center><input id="maseventos" value="más eventos" type="submit" class="botonclase" /></center>
}
</table>

<script>
    
    if ('@Model.Count()'>5)
        document.getElementById("maseventos").focus();
    

</script>